package com.yc.yuehui.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.yuehui.entity.YhUser;
import com.yc.yuehui.mapper.YhUserMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class IndexAction {

    @Resource
    private YhUserMapper yhUserMapper;

    @GetMapping("queryNew")
    public List<YhUser> queryNew(){
        IPage<YhUser> page = new Page<>(1,10);
        yhUserMapper.selectPage(page,null);
        return page.getRecords();
    }
}
